<template>
  <div style="padding:23px 30px 30px 50px;background:#BBE6F7" class="systemconfig">
    <noAuth :createFun="createFun">
      <el-row>  
        <el-col :span="12">
          <el-form ref="platform" :model="platform" label-width="80px">
            <el-form-item label="系统名称" >
              <el-input v-model="platform.xtmc" :disabled="xtmcdisabled"></el-input>
              <i class="el-icon-edit icon_new" @click="xtmcClick" v-if="xtmchidden"></i>
              <i class="el-icon-circle-check icon_new" @click="xtmcsave" v-if="!xtmchidden"></i>
            </el-form-item>
            <el-form-item label="授权截止时间" class="titletime">
              <!-- <el-col :span="10">
                <el-input v-model="platform.rjsqkssj" disabled></el-input>
              </el-col>
              <el-col :span="3" style="text-align: center">
                <div style="margin-left:-24px;">---</div>
              </el-col>
              <el-col :span="10">
                <el-input v-model="platform.rjsqjssj" disabled style="width:212px"></el-input>
              </el-col> -->
              <el-input v-model="platform.rjsqjssj" disabled></el-input>
            </el-form-item>
            <el-form-item label="每页条数">
              <el-input v-model="platform.myts" :disabled="mytsdisabled"></el-input>
              <i class="el-icon-edit icon_new" @click="mytsClick" v-if="mytshidden"></i>
              <i class="el-icon-circle-check icon_new" @click="mytssave" v-if="!mytshidden"></i>
            </el-form-item>
            <el-form-item label="图片上传路径" class="titletime">
              <el-input v-model="platform.tpsclj" :disabled="tpscljdisabled"></el-input>
              <!-- <i class="el-icon-edit icon_new" @click="tpscljClick" v-if="tpscljhidden"></i> -->
              <i class="el-icon-circle-check icon_new" @click="tpscljsave" v-if="!tpscljhidden"></i>
            </el-form-item>
            <el-form-item label="Logo">
              <!-- <el-input v-model="platform.ll" :disabled="lldisabled" v-if="llhidden"></el-input> -->
              <!-- 图片上传 -->
              <el-upload v-if="llhidden"
                class="avatar-uploader"
                action="#"
                :show-file-list="false"
                :http-request="uploadImg"
                :on-change="handleChange"
                :before-upload="beforeAvatarUpload"
                :auto-upload="true">
                <template  v-if="activeImg">
                  <img :src="activeImg" class="avatar" />
                </template>
                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过1MB</div> -->
              </el-upload>
              <!-- <i class="el-icon-edit icon_new" @click="llClick" v-if="llhidden"></i> -->
              <!-- <i class="el-icon-circle-check icon_new" @click="llsave" v-if="!llhidden"></i> -->
            </el-form-item>          
          </el-form>
        </el-col>
        <el-col :span="11" :offset="1">
          <el-row class="carlist">
            <el-col :span="3" class="cartitle">车辆品牌</el-col>
            <el-col :span="10" style="position: relative;">
              <ul>
                <li v-for="(item,index) in cardata" @mouseenter="clppmouseenter(item)" @mouseleave="clppmouseleave(item)" @click="clppClick(item,index)" :class="clppstate==index+1?'clppstyle':''">{{item.clpp}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="dialogVisible = true;clppname='';clppremark=''"></i>
                <i class="el-icon-delete" @click="clppDelete()"></i>
                <i class="el-icon-edit" @click="clppUpdate()"></i>
              </div>
              <div v-show="clpphoverstate" class="hoverstyle hoverstyle1">
                <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{clpphoverdata}}</p> 
              </div>
              <el-dialog
                title="父品牌操作"
                :visible.sync="dialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>品牌名字：</span><el-input v-model="clppname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>品牌备注：</span><el-input v-model="clppremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="dialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="clppInsert()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
            <el-col :span="10" style="position: relative;">
              <ul>
                <template  v-for="item in cardata" v-if="item.id == clppid">
                  <li v-for="(items,index) in item.sonList" @mouseenter="sonemouseenter(items)" @mouseleave="sonemouseleave(items)" :class="sonestate==index?'sonestyle':''" @click="soneClick(items,index)">
                    {{items.clpp}}
                  </li>
                </template>
                <div class="iconoperation">
                  <i class="el-icon-circle-plus" @click="dialogVisibleson = true;clppnameson='';clppremarkson=''"></i>
                  <i class="el-icon-delete" @click="sonDelete()"></i>
                  <i class="el-icon-edit" @click="sonUpdate()"></i>
                </div>
                <div v-show="sonehoverstate" class="hoverstyle hoverstyle1">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{sonehoverdata}}</p> 
                </div>
                <el-dialog
                title="子品牌操作"
                :visible.sync="dialogVisibleson"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>品牌名字：</span><el-input v-model="clppnameson"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>品牌备注：</span><el-input v-model="clppremarkson" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="dialogVisibleson = false">取 消</el-button>
                  <el-button type="primary" @click="sonInsert()">确 定</el-button>
                </span>
              </el-dialog>
              </ul>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-row class="newcarlist carlist">
            <el-col :span="3" class="cartitle newcartitle">部门</el-col>
            <el-col :span="20" style="position: relative;">
              <ul>
                <li  v-for="(item,index) in deptdata" @click="deptClick(item,index)" @mouseenter="deptmouseenter(item)" @mouseleave="deptmouseleave(item)" :class="deptstate==index+1?'clppstyle':''">{{item.bmmc}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="deptdialogVisible = true;deptname='';deptremark=''"></i>
                <i class="el-icon-delete" @click="deptDelete()"></i>
                <i class="el-icon-edit" @click="deptUpdate()"></i>
              </div>
              <div v-show="depthoverstate" class="hoverstyle">
                <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{depthoverdata}}</p> 
              </div>
              <el-dialog
                title="部门操作"
                :visible.sync="deptdialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>部门名字：</span><el-input v-model="deptname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>部门备注：</span><el-input v-model="deptremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="deptdialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="deptsave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>
          <el-row class="newcarlist carlist">
            <el-col :span="3" class="cartitle newcartitle">小组</el-col>
            <el-col :span="20" style="position: relative;">
              <ul>
                <li v-for="(item,index) in teamdata" @mouseenter="Teammouseenter(item)" @mouseleave="Teammouseleave(item)" @click="TeamClick(item,index)" :class="teamstate==index+1?'clppstyle':''">{{item.xzmc}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="teamdialogVisible = true;teamname='';teamremark=''"></i>
                <i class="el-icon-delete" @click="TeamDelete()"></i>
                <i class="el-icon-edit" @click="TeamUpdate()"></i>
              </div>
              <div v-show="Teamhoverstate" class="hoverstyle">
                <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{Teamhoverdata}}</p> 
              </div>
              <el-dialog
                title="小组操作"
                :visible.sync="teamdialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>小组名字：</span><el-input v-model="teamname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>小组备注：</span><el-input v-model="teamremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="teamdialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="Teamsave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="11" :offset="1">
          <el-row class="carlist" style="margin-top:20px;height:376px">
            <el-col :span="3" class="cartitle" style="height:376px">维修保养</el-col>
            <el-col :span="10" style="position: relative;">
              <ul style="height:376px">
                <li v-for="(item,index) in RepairMaintainProjdata" @mouseenter="RepairMaintainProjmouseenter(item)" @mouseleave="RepairMaintainProjmouseleave(item)" @click="RepairMaintainProjClick(item,index)" :class="RepairMaintainProjstate==index?'clppstyle':''">{{item.wxbyxm}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="RepairMaintainProjdialogVisible = true;RepairMaintainProjname='';RepairMaintainProjremark='';"></i>
                <i class="el-icon-delete" @click="RepairMaintainProjDelete()"></i>
                <i class="el-icon-edit" @click="RepairMaintainProjUpdate()"></i>
              </div>
              <div v-show="RepairMaintainProjhoverstate" class="hoverstyle hoverstyle1">
                <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{RepairMaintainProjhoverdata}}</p> 
              </div>
              <el-dialog
                title="维修保养大类操作"
                :visible.sync="RepairMaintainProjdialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>维修保养大类名字：</span><el-input v-model="RepairMaintainProjname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>维修保养大类备注：</span><el-input v-model="RepairMaintainProjremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="RepairMaintainProjdialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="RepairMaintainProjsave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
            <el-col :span="10" style="position: relative;">
              <ul  style="height:376px">
                <template  v-for="item in RepairMaintainProjdata" v-if="item.id ==RepairMaintainProjid">
                  <li v-for="(items,index) in item.sonList" @mouseenter="RepairMaintainsonmouseenter(items)" @mouseleave="RepairMaintainsonmouseleave(items)" :class="RepairMaintainProjstateson==index?'sonestyle':''" @click="RepairMaintainsonClick(items,index)">
                    {{items.wxbyxm}}
                  </li>
                </template>
                <div class="iconoperation">
                  <i class="el-icon-circle-plus" @click="RepairMaintainProjdialogVisibleson = true;RepairMaintainProjnameson='';RepairMaintainProjremarkson=''"></i>
                  <i class="el-icon-delete" @click="RepairMaintainsonDelete()"></i>
                  <i class="el-icon-edit" @click="RepairMaintainsonUpdate()"></i>
                </div>
                <div v-show="RepairMaintainsonhoverstate" class="hoverstyle hoverstyle1">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{RepairMaintainsonhoverdata}}</p> 
                </div>
                <el-dialog
                title="维修保养小类操作"
                :visible.sync="RepairMaintainProjdialogVisibleson"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>维修保养小类名字：</span><el-input v-model="RepairMaintainProjnameson"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>维修保养小类备注：</span><el-input v-model="RepairMaintainProjremarkson" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="RepairMaintainProjdialogVisibleson = false">取 消</el-button>
                  <el-button type="primary" @click="RepairMaintainsonsave()">确 定</el-button>
                </span>
              </el-dialog>
              </ul>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-row class="newcarlist carlist">
            <el-col :span="3" class="cartitle newcartitle">仓库</el-col>
            <el-col :span="20" style="position: relative;">
              <ul>
                <li v-for="(item,index) in selectStorehouseNamedata"  @mouseenter="StorehouseNamemouseenter(item)" @mouseleave="StorehouseNamemouseleave(item)" @click="StorehouseNameClick(item,index)" :class="selectStorehouseNamestate==index+1?'clppstyle':''">{{item.ckmc}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="selectStorehouseNamedialogVisible = true;selectStorehouseNamename='';selectStorehouseNameremark='';"></i>
                <i class="el-icon-delete" @click="StorehouseNameDelete()"></i>
                <i class="el-icon-edit" @click="StorehouseNameUpdate()"></i>
              </div>
              <div v-show="StorehouseNamehoverstate" class="hoverstyle">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{StorehouseNamehoverdata}}</p> 
                </div>
              <el-dialog
                title="仓库操作"
                :visible.sync="selectStorehouseNamedialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>仓库名字：</span><el-input v-model="selectStorehouseNamename"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>仓库备注：</span><el-input v-model="selectStorehouseNameremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="selectStorehouseNamedialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="StorehouseNamesave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>
          <el-row class="newcarlist carlist">
            <el-col :span="3" class="cartitle newcartitle">维修类别</el-col>
            <el-col :span="20" style="position: relative;">
              <ul>
                <li v-for="(item,index) in RepairClassdata"  @mouseenter="RepairClassmouseenter(item)" @mouseleave="RepairClassmouseleave(item)" @click="RepairClassClick(item,index)" :class="RepairClassstate==index+1?'clppstyle':''">{{item.wxlb}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="RepairClassdialogVisible = true;RepairClassname='';RepairClassremark='';"></i>
                <i class="el-icon-delete" @click="RepairClassDelete()"></i>
                <i class="el-icon-edit" @click="RepairClassUpdate()"></i>
              </div>
              <div v-show="RepairClasshoverstate" class="hoverstyle">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{RepairClasshoverdata}}</p> 
                </div>
              <el-dialog
                title="维修类别操作"
                :visible.sync="RepairClassdialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>维修类别名字：</span><el-input v-model="RepairClassname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>维修类别备注：</span><el-input v-model="RepairClassremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="RepairClassdialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="RepairClasssave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="11" :offset="1">
          <el-row class="carlist" style="margin-top:20px;height:376px">
            <el-col :span="3" class="cartitle newcartitle" style="height:376px;line-height:376px">预警项目</el-col>
            <el-col :span="20" style="position: relative;">
              <ul style="height:376px;width:90%">
                <li v-for="(item,index) in WarnProjectdata" @mouseenter="WarnProjectmouseenter(item)" @mouseleave="WarnProjectmouseleave(item)" @click="WarnProjectClick(item,index)" :class="WarnProjectstate==index+1?'clppstyle':''">{{item.yjxm}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="WarnProjectdialogVisible = true;WarnProjectname='';WarnProjectremark='';"></i>
                <i class="el-icon-delete" @click="WarnProjectrDelete()"></i>
                <i class="el-icon-edit" @click="WarnProjectUpdate()"></i>
              </div>
              <div v-show="WarnProjecthoverstate" class="hoverstyle hoverstyle1">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{WarnProjecthoverdata}}</p> 
                </div>
              <el-dialog
                title="预警操作"
                :visible.sync="WarnProjectdialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>预警名字：</span><el-input v-model="WarnProjectname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>预警备注：</span><el-input v-model="WarnProjectremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="WarnProjectdialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="WarnProjectsave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-row class="newcarlist carlist">
            <el-col :span="3" class="cartitle newcartitle">车辆类别</el-col>
            <el-col :span="20" style="position: relative;">
              <ul>
                <li v-for="(item,index) in VehicleClassdata" @mouseenter="VehicleClassmouseenter(item)" @mouseleave="VehicleClassmouseleave(item)" @click="VehicleClassClick(item,index)" :class="VehicleClassstate==index+1?'clppstyle':''">{{item.cllb}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="VehicleClassdialogVisible = true;VehicleClassname='';VehicleClassremark='';"></i>
                <i class="el-icon-delete" @click="VehicleClassDelete()"></i>
                <i class="el-icon-edit" @click="VehicleClassUpdate()"></i>
              </div>
              <div v-show="VehicleClasshoverstate" class="hoverstyle">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{VehicleClasshoverdata}}</p> 
                </div>
              <el-dialog
                title="车辆类别操作"
                :visible.sync="VehicleClassdialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>车辆类别名字：</span><el-input v-model="VehicleClassname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>车辆类别备注：</span><el-input v-model="VehicleClassremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="VehicleClassdialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="VehicleClasssave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>
          <el-row class="newcarlist carlist">
            <el-col :span="3" class="cartitle newcartitle">物资类别</el-col>
            <el-col :span="20" style="position: relative;">
              <ul>
                <li v-for="(item,index) in GoodsClassdata" @mouseenter="GoodsClassmouseenter(item)" @mouseleave="GoodsClassmouseleave(item)" @click="GoodsClassClick(item,index)" :class="GoodsClassstate==index+1?'clppstyle':''">{{item.wzlb}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="GoodsClassdialogVisible = true;GoodsClassname='';GoodsClassremark='';"></i>
                <i class="el-icon-delete" @click="GoodsClassDelete()"></i>
                <i class="el-icon-edit" @click="GoodsClassUpdate()"></i>
              </div>
              <div v-show="GoodsClasshoverstate" class="hoverstyle">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{GoodsClasshoverdata}}</p> 
                </div>
              <el-dialog
                title="物资类别操作"
                :visible.sync="GoodsClassdialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>物资类别名字：</span><el-input v-model="GoodsClassname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>物资类别备注：</span><el-input v-model="GoodsClassremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="GoodsClassdialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="GoodsClasssave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="11" :offset="1">
          <el-row class="carlist" style="margin-top:20px;height:376px">
            <el-col :span="3" class="cartitle newcartitle" style="height:376px;line-height:376px">供应商</el-col>
            <el-col :span="20" style="position: relative;">
              <ul style="height:376px;width:90%">
                <li v-for="(item,index) in Supplierdata" @mouseenter="Suppliermouseenter(item)" @mouseleave="Suppliermouseleave(item)" @click="SupplierClick(item,index)" :class="Supplierstate==index+1?'clppstyle':''">{{item.gysmc}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="SupplierdialogVisible = true;Suppliername='';Supplierremark='';"></i>
                <i class="el-icon-delete" @click="SupplierDelete()"></i>
                <i class="el-icon-edit" @click="SupplierUpdate()"></i>
              </div>
              <div v-show="Supplierhoverstate" class="hoverstyle hoverstyle1">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{Supplierhoverdata}}</p> 
                </div>
              <el-dialog
                title="供应商操作"
                :visible.sync="SupplierdialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>供应商名字：</span><el-input v-model="Suppliername"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>供应商备注：</span><el-input v-model="Supplierremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="SupplierdialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="Suppliersave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-row class="newcarlist carlist">
            <el-col :span="3" class="cartitle newcartitle">测评类别</el-col>
            <el-col :span="20" style="position: relative;">
              <ul>
                <li v-for="(item,index) in CheckEvaluateClassdata" @mouseenter="CheckEvaluateClassmouseenter(item)" @mouseleave="CheckEvaluateClassmouseleave(item)" @click="CheckEvaluateClassClick(item,index)" :class="CheckEvaluateClassstate==index+1?'clppstyle':''">{{item.cplb}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="CheckEvaluateClassdialogVisible = true;CheckEvaluateClassname='';CheckEvaluateClassremark='';"></i>
                <i class="el-icon-delete" @click="CheckEvaluateClassDelete()"></i>
                <i class="el-icon-edit" @click="CheckEvaluateClassUpdate()"></i>
              </div>
              <div v-show="CheckEvaluateClasshoverstate" class="hoverstyle">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{CheckEvaluateClasshoverdata}}</p> 
                </div>
              <el-dialog
                title="测评类别操作"
                :visible.sync="CheckEvaluateClassdialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>测评类别名字：</span><el-input v-model="CheckEvaluateClassname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>测评类别备注：</span><el-input v-model="CheckEvaluateClassremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="CheckEvaluateClassdialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="CheckEvaluateClasssave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>
          <el-row class="newcarlist carlist">
            <el-col :span="3" class="cartitle newcartitle">测评单位</el-col>
            <el-col :span="20" style="position: relative;">
              <ul>
                <li v-for="(item,index) in CheckEvaluateOrgdata" @mouseenter="CheckEvaluateOrgmouseenter(item)" @mouseleave="CheckEvaluateOrgmouseleave(item)" @click="CheckEvaluateOrgClick(item,index)" :class="CheckEvaluateOrgstate==index+1?'clppstyle':''">{{item.cpdw}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="CheckEvaluateOrgdialogVisible = true;CheckEvaluateOrgname='';CheckEvaluateOrgremark=''"></i>
                <i class="el-icon-delete" @click="CheckEvaluateOrgDelete()"></i>
                <i class="el-icon-edit" @click="CheckEvaluateOrgUpdate()"></i>
              </div>
              <div v-show="CheckEvaluateOrghoverstate" class="hoverstyle">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{CheckEvaluateOrghoverdata}}</p> 
                </div>
              <el-dialog
                title="测评单位操作"
                :visible.sync="CheckEvaluateOrgdialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>测评单位名字：</span><el-input v-model="CheckEvaluateOrgname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>测评单位备注：</span><el-input v-model="CheckEvaluateOrgremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="CheckEvaluateOrgdialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="CheckEvaluateOrgsave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="11" :offset="1">
          <el-row class="newcarlist carlist">
            <el-col :span="3" class="cartitle newcartitle">维修厂</el-col>
            <el-col :span="20" style="position: relative;">
              <ul>
                <li v-for="(item,index) in RepairFactorydata" @mouseenter="RepairFactorymouseenter(item)" @mouseleave="RepairFactorymouseleave(item)" @click="RepairFactoryClick(item,index)" :class="RepairFactorystate==index+1?'clppstyle':''">{{item.wxcmc}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="RepairFactorydialogVisible = true;RepairFactoryname='';RepairFactoryremark=''"></i>
                <i class="el-icon-delete" @click="RepairFactoryDelete()"></i>
                <i class="el-icon-edit" @click="RepairFactoryUpdate()"></i>
              </div>
              <div v-show="RepairFactoryhoverstate" class="hoverstyle hoverstyle1">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{RepairFactoryhoverdata}}</p> 
                </div>
              <el-dialog
                title="维修厂操作"
                :visible.sync="RepairFactorydialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>维修厂名字：</span><el-input v-model="RepairFactoryname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>维修厂备注：</span><el-input v-model="RepairFactoryremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="RepairFactorydialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="RepairFactorysave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>
          <el-row class="newcarlist carlist">
            <el-col :span="3" class="cartitle newcartitle">物资</el-col>
            <el-col :span="20" style="position: relative;">
              <ul>
                <li v-for="(item,index) in Goodsdata" @mouseenter="Goodsmouseenter(item)" @mouseleave="Goodsmouseleave(item)" @click="GoodsClick(item,index)" :class="Goodsstate==index+1?'clppstyle':''">{{item.wzmc}}</li>
              </ul>
              <div class="iconoperation">   
                <i class="el-icon-circle-plus" @click="GoodsdialogVisible = true;Goodsname='';Goodsremark=''"></i>
                <i class="el-icon-delete" @click="GoodsDelete()"></i>
                <i class="el-icon-edit" @click="GoodsUpdate()"></i>
              </div>
              <div v-show="Goodshoverstate" class="hoverstyle hoverstyle1">
                  <p class="textshow"><span style="font-size:14px;font-weight:700">备注:</span>{{Goodshoverdata}}</p> 
                </div>
              <el-dialog
                title="物资操作"
                :visible.sync="GoodsdialogVisible"
                width="30%"
                center>
                <span>
                  <div style="line-height:40px">
                    <span>物资名字：</span><el-input v-model="Goodsname"></el-input>
                  </div>
                  <div style="line-height:40px">
                    <span>物资备注：</span><el-input v-model="Goodsremark" type="textarea" :rows="3"></el-input>
                  </div>
                </span>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="GoodsdialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="Goodssave()">确 定</el-button>
                </span>
              </el-dialog>
            </el-col>
          </el-row>    
        </el-col>
      </el-row>   
    </noAuth>
  </div>
</template>

<script>
import noAuth from '@/components/noAuth'
import {xtmcselect,rjsqkssjselect,pageselect,uploadselect,logoselect} from "@/api/api"
import {xtmcupdate,pageupdate,pictureupdate,logoupdate} from "@/api/api"
import {carselect,insertcarbrand,updatecarbrand,deletecarbrand,deletecarbrandson} from "@/api/api"
import adapter from './adapter'
import imgUpload from '@/components/imgUpload'
export default {
  name: '',
  components:{
    imgUpload,
    noAuth,
  },
  data() { 
    return {
      //初始数据
      platform:{
        xtmc:"",
        rjsqkssj:"",
        rjsqjssj:"",
        myts:"",
        tpsclj:"",
        ll:""
      },
      //系统名称状态切换
      xtmcdisabled:true,
      xtmchidden:true,
      //每页条数状态切换
      mytsdisabled:true,
      mytshidden:true,
      //图片上传状态切换
      tpscljdisabled:true,
      tpscljhidden:true,
      //logo路径状态切换
      lldisabled:true,
      llhidden:true,
      //车辆品牌
      cardata:[],
      //父品牌状态
      clppstate:1,
      //子品牌状态
      sonestate:0,
      dialogVisible:false,
      clppname:"",//品牌名字
      clppremark:"" ,//品牌备注
      dialogVisibleson:false,
      clppnameson:"",
      clppremarkson:"",
      updatestate:false,
      updatestateson:false,
      clppid:"1",
      ...adapter.data,
    }
  },
  computed: {
    ...adapter.computed,
  },
  mounted() {
    this.activeImg = this.logo
  },
  methods:{
    createFun() {
      let that = this;
      //获取系统名称数据
      xtmcselect().then((res)=>{
        // console.log(res.data.list[0].xtmc)
        that.platform.xtmc = res.data.list[0].xtmc
        that.xtmcid = res.data.list[0].id
      })
      //获取授权时间数据
      rjsqkssjselect().then((res)=>{
        // console.log(res.data)
        that.platform.rjsqkssj = res.data.list[0].rjsqkssj
        that.platform.rjsqjssj = res.data.list[0].rjsqjssj
      })
      //获取每页条数数据
      pageselect().then((res)=>{
        // console.log(res)
        that.platform.myts = res.data.list[0].myts
        that.mytsid = res.data.list[0].id
      })
      //图片上传路径数据
      uploadselect().then((res)=>{
        that.platform.tpsclj = res.data.list[0].tpsclj
        that.tpscljid = res.data.list[0].id
      })
      //logo路径数据
      logoselect().then((res)=>{
        that.platform.ll = res.data.list[0].ll
        that.llid = res.data.list[0].id
      })

      //获取车辆品牌的数据
      this.carselects()
      this.initselectDept()
      this.initselectTeam()
      this.initselectStorehouseName()
      this.initselectRepairClass()
      this.initselectVehicleClass()
      this.initselectGoodsClass()
      this.initselectCheckEvaluateClass()
      this.initselectCheckEvaluateOrg()
      this.initselectGoods()
      this.initselectRepairFactory()
      this.initselectSupplier()
      this.initselectWarnProject()
      this.initselectRepairMaintainProjAndSon()
    },
    carselects(){
      let that =this;
      carselect().then((res)=>{
        console.log(res.data.list)
        that.cardata = res.data.list
      })
    },
    //车辆品牌新增保存
    clppInsert(){
      let that = this;
      let params ={
        id:this.clppid,
        sonid:this.soneid,
        name:this.clppname,
        bz:this.clppremark,
        flg:"1"
      }
      console.log(params)
      if(this.updatestate){
        updatecarbrand(params).then((res)=>{
          // console.log(res)
          that.dialogVisible = false
          that.carselects() 
        })
      }else{
        if(this.clppname == ""){
            this.$message({
              type:"info",
              message:"请添加品牌名字"
            })
        }else{
          insertcarbrand(params).then((res)=>{
            // console.log(res)
            that.dialogVisible = false
            that.carselects() 
          })
        }
      }
      this.updatestate = false;
    },
    //主品牌删除
    clppDelete(){
      let id = this.clppid;
      let that = this;
      if(id == undefined){
        this.$message({
          type: 'info',
          message: `请选中一个父品牌删除`
        });
      }else{
        this.$confirm('是否删除该父品牌及其所有子品牌', '删除', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          deletecarbrand(id).then((res)=>{
            this.$message({
              type: 'success',
              message: '删除成功!'
            });
            console.log(res)
            that.carselects() 
          })  
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });          
        });
        
      }
      
    },
    //主品牌修改
    clppUpdate(){
      if(this.clppid == undefined){
        this.$message({
          type: 'info',
          message: `请选中一个品牌修改`
        });
      }else{
        this.dialogVisible = true;
        this.clppname = this.clppdata.clpp;
        this.clppremark = this.clppdata.bz;
        this.updatestate = true;
      }
    },
    //子品牌添加保存
    sonInsert(){
      if(this.clppid == undefined){
        //console.log("请选中一个品牌添加")
        this.$message({
          type: 'info',
          message: `请选中一个品牌添加`
        });
      }else{
        let that = this;
        let params ={
          id:this.clppid,
          sonId:this.sonid,
          name:this.clppnameson,
          bz:this.clppremarkson,
          flg:"2"
        }
        console.log(params)
        // console.log(this.updatestate)
        if(this.updatestateson){
          updatecarbrand(params).then((res)=>{
            console.log(res)
            that.dialogVisibleson = false
            that.carselects() 
          })
        }else{
          // console.log(this.clppnameson)
          if(this.clppnameson == ""){
            this.$message({
              type:"info",
              message:"请添加品牌名字"
            })
          }else{
            insertcarbrand(params).then((res)=>{
              console.log(res)
              that.dialogVisibleson = false
              that.carselects() 
            })
          }
        }
        this.updatestateson = false;
      }
      
    },
    //子品牌删除
    sonDelete(){
      let id = this.sonid;
      let that = this;
      if(id == undefined){
        this.$message({
          type: 'info',
          message: `请选中一个子品牌删除`
        });
      }else{
        this.$confirm('是否删除该子品牌', '删除', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          deletecarbrandson(id).then((res)=>{
            this.$message({
              type: 'success',
              message: '删除成功!'
            });
            console.log(res)
            that.carselects() 
          })  
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });          
        });
        
      }
    },
    //子品牌修改
    sonUpdate(){
      console.log(this.sonid)
      if(this.sonid == undefined){
        this.$message({
          type: 'info',
          message: `请选中一个品牌修改`
        });
      }else{
        this.dialogVisibleson = true;
        this.clppnameson = this.sondata.clpp;
        this.clppremarkson = this.sondata.bz;
        this.updatestateson = true;
      }
    },
    //点击车辆品牌
    clppClick(item,index){
      // console.log(item)
      this.clppstate = index+1;
      this.clppid = item.id
      this.clppdata = item
    },
    soneClick(item,index){
      console.log(item)
      this.sonestate = index
      this.sonid = item.id
      this.sondata = item
    },
    //系统名称功能函数
    xtmcClick(){
      this.xtmcdisabled=false
      this.xtmchidden = false
    },
    xtmcsave(){
      let that= this;
      this.$alert('确认修改', '修改', {
          confirmButtonText: '确定',
          callback: action => {
            let params = {
              id:that.xtmcid,
              xtmc:that.platform.xtmc
            }
            console.log(params)
            xtmcupdate(params).then((res)=>{
              console.log(res)
              if(res.code == 0){
                this.$message({
                  type: 'success',
                  message: `修改成功`
                });
                this.SET_SYS_NAME(that.platform.xtmc) // 动态修改系统名称
                that.xtmcdisabled=true
                that.xtmchidden = true
              }
            })
          }
      });   
    },
    //每页条数功能函数
    mytsClick(){
      this.mytsdisabled=false
      this.mytshidden = false
    },
    mytssave(){
      let that= this;
      this.$alert('确认修改', '修改', {
          confirmButtonText: '确定',
          callback: action => {
            let params = {
              id:that.mytsid,
              myts:that.platform.myts
            }
            console.log(params)
            pageupdate(params).then((res)=>{
              console.log(res)
              if(res.code == 0){
                this.$message({
                  type: 'success',
                  message: `修改成功`
                });
                this.mytsdisabled=true
                this.mytshidden = true
              }
            })
          }
      }); 
    },
    //图片上传地址功能函数
    tpscljClick(){
      this.tpscljdisabled=false
      this.tpscljhidden = false
    },
    tpscljsave(){
      let that= this;
      this.$alert('确认修改', '修改', {
          confirmButtonText: '确定',
          callback: action => {
            let params = {
              id:that.tpscljid,
              tpsclj:that.platform.tpsclj
            }
            console.log(params)
            pictureupdate(params).then((res)=>{
              console.log(res)
              if(res.code == 0){
                this.$message({
                  type: 'success',
                  message: `修改成功`
                });
                this.tpscljdisabled=true
                this.tpscljhidden = true
              }
            })
          }
      });
    },
    //logo路径功能函数
    llClick(){
      this.lldisabled=false
      this.llhidden = false
    },
    llsave(){ 
      let that= this;
      this.$alert('确认修改', '修改', {
          confirmButtonText: '确定',
          callback: action => {
            let params = {
              id:that.llid,
              ll:that.platform.ll
            }
            console.log(params)
            logoupdate(params).then((res)=>{
              console.log(res)
              if(res.code == 0){
                this.$message({
                  type: 'success',
                  message: `修改成功`
                });
                  this.lldisabled=true
                  this.llhidden = true
              }
            })
          }
      });
    },
    ...adapter.methods,
  },
 }
</script>
<style>
.systemconfig .el-form-item__label{
  background: #666666;
  text-align: center !important;
  color:#fff;
  text-indent: 10px;
  font-size: 14px;
}
.systemconfig .titletime .el-form-item__label{
  line-height: 16px !important;
  padding: 5px 10px;
  text-indent: 0;
}
.systemconfig .el-form-item__content{
  margin-left: 100px !important;
}
.systemconfig .avatar-uploader .el-upload {
    border: 1px dashed #ccc;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

.systemconfig .avatar-uploader .el-upload:hover {
    border-color: #409eff;
  }

.systemconfig .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
  }

.systemconfig .avatar {
    width: 60px;
    height: 60px;
    display: block;
  }
.el-dialog .el-input{
  width: 100% !important;
}
</style>
<style scoped>
.hoverstyle{
  width: 200px;
  background: #fff;
  position: absolute;
  top: 0;
  right: -150px;
  z-index: 999;
  border-radius: 5px;
  box-shadow: 0 0 2px #000;
  text-align: left;
}
.hoverstyle1{
  left: -184px;
}
.textshow{
  padding: 0 20px;
  height: auto;
  /* overflow: hidden;
  display: -webkit-box;
  text-overflow: ellipsis;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  text-align: left; */
}
.el-input{
  width: 85%;
}
.el-form-item__content{
  position: relative;
  margin-left: 100px !important;
}
.icon_new{
  font-size:24px;
  padding-left:30px;
  position: absolute;
  top: 8px;
}
.carlist{
  height: 314px;
  /* border: 1px solid #797979; */
  font-size: 14px;
}
.newcarlist{
  height: 178px;
  margin-top: 20px;
  font-size: 14px;
}
.carlist ul{
  list-style: none;
  height: 314px;
  overflow-y: auto;
  color: #606266;
  margin: 0px;
  padding-left:20px;
  width: 80%;
  font-size: 12px;
}
.carlist ul::-webkit-scrollbar{
    width: 10px;
    height: 10px;
  }
.carlist ul::-webkit-scrollbar-thumb{
    border-radius: 5px;
    box-shadow:inset 0 0 5px rgba(0,0,0,0.2);
    background: rgba(0,0,0,0.2);
  }
.carlist ul::-webkit-scrollbar-track{
    box-shadow:inset 0 0 5px rgba(0,0,0,0.2);
    border-radius: 0;
    background: rgba(0,0,0,0.1);
  }
.carlist ul>li{
  height: 45px;
  line-height: 45px;
  border: 1px solid #797979;
  background: #fff;
  margin-top:-1px ;
  text-align: center;
  cursor: pointer;
}
ul>li:hover{
  background:#000498;
  color: #fff;
}
.newcarlist ul{
  height: 178px;
  width: 90%;
  font-size: 12px;
}
.cartitle{
  font-weight: 700;
  color: #fff;
  line-height:314px;
  text-align: center;
  background: #666;
}
.newcartitle{
  line-height:177px;
}
.clppstyle,.sonestyle{
  background:#000498 !important;
  color: #fff;
}
.iconoperation{
  position: absolute;
  top: -20px;
  right: 0px;
  display: flex;
  flex-direction: column;
  font-size: 24px;
}
.iconoperation>i{
  margin-top: 18px;
  cursor: pointer;
}
</style>